from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('reservation', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='PaymentRecord',
            fields=[
                ('id', models.BigIntegerField(editable=False, primary_key=True, serialize=False)),
                ('order_id', models.BigIntegerField(verbose_name='订单ID')),
                ('order_number', models.CharField(max_length=50, verbose_name='订单号')),
                ('trade_no', models.CharField(max_length=64, unique=True, verbose_name='支付宝交易号')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='支付金额')),
                ('payment_method', models.CharField(default='alipay', max_length=20, verbose_name='支付方式')),
                ('status', models.CharField(choices=[('pending', '处理中'), ('success', '支付成功'), ('failed', '支付失败')], default='pending', max_length=20, verbose_name='支付状态')),
                ('payment_time', models.DateTimeField(blank=True, null=True, verbose_name='支付时间')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '支付记录',
                'verbose_name_plural': '支付记录',
                'db_table': 'reservation_payment_record',
            },
        ),
    ] 